{% extends 'profileapp/profile/base_home.html' %}

{% block content %}
  <div class="register-container d-flex justify-content-center align-items-center">
    <div class="register-box p-4 rounded">
      <h2 class="mb-4">Registration</h2>
      <form class="register-form" method="POST" action="{% url 'profile:register' %}" enctype="multipart/form-data">
        {% csrf_token %}
        {{ form.username.label_tag }}
        {{ form.username }}
          {% for error in form.username.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}


        {{ form.first_name.label_tag }}
        {{ form.first_name }}
          {% for error in form.first_name.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.last_name.label_tag }}
        {{ form.last_name }}
          {% for error in form.last_name.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.email.label_tag }}
        {{ form.email }}
          {% for error in form.email.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.phone_number.label_tag }}
        {{ form.phone_number }}
          {% for error in form.phone_number.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.password1.label_tag }}
        {{ form.password1 }}
          {% for error in form.password1.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.password2.label_tag }}
        {{ form.password2 }}
          {% for error in form.password2.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.is_teacher.label_tag }}
        {{ form.is_teacher }}
          {% for error in form.is_teacher.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}

        {{ form.images.label_tag }}
        {{ form.images }}
          {% for error in form.image.errors %}
              <div class="error">{{ error }}</div>
          {% endfor %}
        <button type="submit" class="btn btn-primary">Register</button>
      </form>
    </div>
  </div>
{% endblock %}
